package com.vivz.baby.enumeration;

public enum LogEntryType {
	
	BREAST_FEEDING_LEFT(1, "BREAST FEEDING (LEFT)"), //
	BREAST_FEEDING_RIGHT(2, "BREAST FEEDING (RIGHT)"), //
	BOTTLE_FEEDING_PUMPED(3, "BOTTLE FEEDING (PUMPED)"), //
	BOTTLE_FEEDING_FORMULA(4, "BOTTLE FEEDING (FORMULA)"), //
	DIRTY_DIAPERS(5, "DIRTY DIAPERS"), //
	SICKNESS(6, "SICKNESS"), //
	SLEEP(7, "SLEEP");
	
	private final int id;
	private final String description;
	
	private LogEntryType(final int id, final String description) {
		this.id = id;
		this.description = description;
	}
	
	public static final LogEntryType getInstance(final int id) {
		
		for (final LogEntryType value : LogEntryType.values()) {
			if (value.id == id) {
				return value;
			}
		}
		
		return null;
	}
	
	public int getId() {
		return id;
	}
	
	public String getDescription() {
		return description;
	}
}
